
#ifndef SHAPEPANEL_H
#define SHAPEPANEL_H

#include <BSpinBox>
#include <BRealSpinBox>
#include <BGroupBox>
#include <BButton>
#include <BColorDialog>
#include <BShape>
#include <BLabel>
#include <BLineEdit>
#include <BButton>
#include <BCheckBox>
#include <BComboBox>
#include <BGroupBox>

#include "MaterialDialog.h"

class ShapePanel : public BGroupBox
{
	BOBJECT(ShapePanel)
public:
	ShapePanel(BWidget* parent = 0);
	~ShapePanel();

protected:
	void slotFoldeButtonChecked(const BObject* object, const BValue& value);

	void slotAssetChanged(BObject* object, const BValue& value);
	void slotVisibleToggled(BObject* object, const BValue& value);
	void slotLineWidthEdited(BObject* object, const BValue& value);
	void slotPointSizeEdited(BObject* object, const BValue& value);
	void slotPolygonModeToggled(BObject* object, const BValue& value);

	void slotLightingToggled(BObject* object, const BValue& value);
	void slotCullbackToggled(BObject* object, const BValue& value);
	void slotDepthTestToggled(BObject* object, const BValue& value);
	void slotPointSmoothToggled(BObject* object, const BValue& value);
	void slotLineSmoothToggled(BObject* object, const BValue& value);
	void slotPolygonSmoothToggled(BObject* object, const BValue& value);
	void slotTransparentToggled(BObject* object, const BValue& value);
	void slotMaterialButtonClicked();
	void slotColorButtonClicked();

protected:
	virtual void styleEvent(const BEvent& event);
	virtual void paintEvent(const BEvent& event);


private:
	BButton*			_foldeButton;
	BCheckBox*			_visibleCheckBox;
	BSpinBox*			_lineWidthSpinBox;
	BSpinBox*			_pointSizeSpinBox;
	BComboBox*			_polygonModeComboBox;

	BCheckBox*			_lightingCheckBox;
	BCheckBox*			_cullbackCheckBox;
	BCheckBox*			_depthTestCheckBox;
	BCheckBox*			_pointSmoothCheckBox;
	BCheckBox*			_lineSmoothCheckBox;
	BCheckBox*			_polySmoothCheckBox;
	BCheckBox*			_transparentCheckBox;
	BButton*			_materialButton;
	BButton*			_colorButton;
	MaterialDialog*		_materialDialog;

	BHolder<BShape>		_shape;
};

#endif